15. Testing Lesson Summary
L5 P4 A13 Outro V2
The final code for the entire three codelabs is here.
This is a simplified version of the tests found in the Official Testing Sample. If you want to see more tests, or check out more advanced testing techniques (such as using a sharedTest folder), take a look at that sample.
More testing resources
Samples:
- Official Testing Sample
- Sunflower demo - This is the main Android Jetpack sample which also makes use of the Android testing libraries
- Espresso testing samples
Android developer documentation:
- Guide to app architecture
- AndroidX Test Library
- AndroidX Architecture Components Core Test Library
- Hamcrest
- Robolectric Testing library
- Source sets
- Test from the command line
- Dependency Injection on Android
- Mockito
- FragmentScenario
- Test your activities
- runBlocking and runBlockingTest
- TestCoroutineDispatcher
- Espresso
- Mockito
- JUnit4
- Test Navigation
- Testing your workers - a guide to testing WorkManager
- Firebase Test Lab - cloud testing infrastructure
Videos:
- Build Testable Apps for Android (Google I/O'19)
- Testing Coroutines on Android (Android Dev Summit '19)
- Fragments: Past, Present, and Future (Android Dev Summit '19) - Testing and Fragments section
- An Opinionated Guide to Dependency Injection on Android (Android Dev Summit '19)
Other:
- Unit-testing LiveData and other common observability problems
- Testing on the Toilet: Know Your Test Doubles
- Using Dagger in your Android App Codelab Tutorial
- Dependency Injection Guidance on Android — ADS 2019
- Dagger in Kotlin: Gotchas and Optimizations
- Dagger.dev
- Easy Coroutines in Android: viewModelScope
- Testing two consecutive LiveData emissions in Coroutines
- Android testing with Espresso’s Idling Resources and testing fidelity
- Test Room migrations